
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        html,body{
            height: 100%;
        }
        /* 也可以左右先浮动，然后中间写在后面见缝插针上去。 */
        .box1{
            height: 100%;
            width: 200px;
            background-color: red;
            float: left;
        }
        .box2{
            height: 100%;
            width: calc(100% - 400px);
            background-color: yellow;
            float: left;
        }
        .box3{
            height: 100%;
            width: 200px;
            background-color: red;
            float: right;
        }
    </style>
</head>

<body>
    <div class="box1">box1</div>
    <div class="box2">box2</div>
    <div class="box3">box3</div>
</body>
</html>